const controller = require("../controllers/questionnaire.controller");
module.exports = (app) => {
  const router = require("express").Router();

  router.post("/app/list", controller.list);
  router.get("/app/getDetail", controller.getDetail);
  router.post("/app/creatRecord", controller.creatRecord);
  router.post("/app/updateRecord", controller.updateRecord);
  router.post("/app/getRecordList", controller.recordList);
  router.get("/app/getRecordDetail", controller.getRecordDetail);

  router.post("/admin/create", controller.create);
  router.get("/admin/del", controller.del);
  router.post("/admin/update", controller.update);
  router.get("/admin/getDetail", controller.getDetail);
  router.post("/admin/list", controller.list);
  router.post("/admin/getRecordList", controller.recordList);
  router.get("/admin/delRecord", controller.delRecord);

  app.use("/api/questionnaire", router);
};
